﻿using System.Web.Optimization;

namespace Trust.Casas.Web
{
    public class BundleConfig
    {
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle(Scripts.Main).Include(
                                                           "~/Scripts/main.js"));

            bundles.Add(new ScriptBundle(Scripts.JQuery).Include(
                                                             "~/Scripts/jquery-{version}.js",
                                                             "~/Scripts/jquery-migrate.js"));

            bundles.Add(new ScriptBundle(Scripts.JQGrid).Include(
                                                             "~/Scripts/trirand/jquery.jqGrid.js",
                                                             "~/Scripts/trirand/jquery.jqGrid.locale-es.js"));

            bundles.Add(new ScriptBundle(Scripts.JQueryUi).Include(
                                                               "~/Scripts/jquery-ui-{version}.js"));
            
            bundles.Add(new ScriptBundle(Scripts.KnockOutPlugIns).Include(
                //"~/Scripts/TrafficCop-amd*",
                                                                      "~/Scripts/infuser-amd*",
                                                                      "~/Scripts/koExternalTemplateEngine-amd*"));

            bundles.Add(new ScriptBundle(Scripts.KnockOut).Include(
                                                               "~/Scripts/knockout-{version}.js",
                                                               "~/Scripts/knockout.mapping-latest*"));

            bundles.Add(new ScriptBundle(Scripts.JQueryValidation).Include(
                                                                       "~/Scripts/jquery.unobtrusive*",
                                                                       "~/Scripts/jquery.validate*"));

            bundles.Add(new ScriptBundle(Scripts.Moment).Include(
                                                             "~/Scripts/moment-with-*"));

            bundles.Add(new ScriptBundle(Scripts.Require).Include(
                                                              "~/Scripts/require.js"));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle(Scripts.Modernizer).Include(
                                                                 "~/Scripts/modernizr-{version}"));

            bundles.Add(new StyleBundle(Styles.Site).Include("~/Content/site.css"));

            bundles.Add(new StyleBundle(Styles.JqueryUi).Include(
                                                             "~/Content/themes/base/jquery.ui.core.css",
                                                             "~/Content/themes/base/jquery.ui.resizable.css",
                                                             "~/Content/themes/base/jquery.ui.selectable.css",
                                                             "~/Content/themes/base/jquery.ui.accordion.css",
                                                             "~/Content/themes/base/jquery.ui.autocomplete.css",
                                                             "~/Content/themes/base/jquery.ui.button.css",
                                                             "~/Content/themes/base/jquery.ui.dialog.css",
                                                             "~/Content/themes/base/jquery.ui.slider.css",
                                                             "~/Content/themes/base/jquery.ui.tabs.css",
                                                             "~/Content/themes/base/jquery.ui.datepicker.css",
                                                             "~/Content/themes/base/jquery.ui.progressbar.css",
                                                             "~/Content/themes/base/jquery.ui.theme.css"));
        }

        public static class Scripts
        {
            public const string Main = "~/bundles/main";

            public const string JQuery = "~/bundles/jquery";

            public const string JQGrid = "~/bundles/jqgrid";

            public const string JQueryUi = "~/bundles/jqueryui";

            public const string KnockOut = "~/bundles/knockout";

            public const string KnockOutPlugIns = "~/bundles/knockoutpi";
            
            public const string JQueryValidation = "~/bundles/jqueryval";

            public const string Moment = "~/bundles/moment";

            public const string Require = "~/bundles/require";

            public const string Modernizer = "~/bundles/modernizr";
        }

        public static class Styles
        {
            public const string Site = "~/Content/css";

            public const string JqueryUi = "~/Content/themes/base/css";

            public const string JQGridStyles = "~/Content/trirand/ui.jqgrid.css";
        }
    }
}